<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <h:form id="EstrategiaGlobalListForm">
        <p:panel>
            <h1 class="close"> Estrategias Globales</h1>
            <br/>
            <p:dataTable id="datalist" value="#{estrategiaGlobalController.items}" var="item"
                         selectionMode="single" selection="#{estrategiaGlobalController.selected}"
                         paginator="true"
                         rowKey="#{item.idEstrategiaGlobal}"
                         rows="10"
                         rowsPerPageTemplate="10,20,30,40,50"
                         >

                <p:ajax event="rowSelect"   update="createButton viewButton editButton deleteButton"/>
                <p:ajax event="rowUnselect" update="createButton viewButton editButton deleteButton"/>


                <p:column>
                    <f:facet name="header">
                        <h:outputText value="#{bundle.ListEstrategiaGlobalTitle_nombre}"/>
                    </f:facet>
                    <h:outputText value="#{item.nombre}"/>
                </p:column>
                <p:column>
                    <f:facet name="header">
                        <h:outputText value="#{bundle.ListEstrategiaGlobalTitle_fechaModificacion}"/>
                    </f:facet>
                    <h:outputText value="#{item.fechaModificacion}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:outputText>
                </p:column>
                <f:facet name="footer">
                    <p:commandButton  rendered="#{usuarioController.permisos()}" id="createButton" icon="ui-icon-plus"   value="#{bundle.Create}" actionListener="#{estrategiaGlobalController.prepareCreate}" update=":EstrategiaGlobalCreateForm" oncomplete="PF('EstrategiaGlobalCreateDialog').show()"/>
                    <p:commandButton id="viewButton"   icon="ui-icon-search" value="#{bundle.View}" update=":EstrategiaGlobalViewForm" oncomplete="PF('EstrategiaGlobalViewDialog').show()" disabled="#{empty estrategiaGlobalController.selected}"/>
                    <p:commandButton  rendered="#{usuarioController.permisos()}" id="editButton"   icon="ui-icon-pencil" value="#{bundle.Edit}" update=":EstrategiaGlobalEditForm" oncomplete="PF('EstrategiaGlobalEditDialog').show()" disabled="#{empty estrategiaGlobalController.selected}"/>
                    <p:commandButton  rendered="#{usuarioController.permisos()}" id="deleteButton" icon="ui-icon-trash"  value="#{bundle.Delete}" actionListener="#{estrategiaGlobalController.destroy}" update="datalist" disabled="#{empty estrategiaGlobalController.selected}"/>
                </f:facet>
            </p:dataTable>
        </p:panel>
    </h:form>

    <ui:include src="Create.xhtml"/>
    <ui:include src="Edit.xhtml"/>
    <ui:include src="View.xhtml"/>

</html>
